async function ${nodeId}(node, index) {
<#include "common/InitLogging.ftl">
    let key;
    let value;
    let input = {};
    try {
        let result = await new Promise(async function (resolve, reject) {
            try {
                key = ${key};
                if (key === '' || key == undefined || key == null) {
                    reject(new Error('key is null'));
                }
                if (typeof (key) != 'string') {
                    key = JSON.stringify(key);
                }
                input.key = key;
                debugLogging.pushDebug('host:' + DATA_SOURCE_CONFIG_JSON.Redis_${nodeId}.host);
                debugLogging.pushDebug('切换' + DATA_SOURCE_CONFIG_JSON.Redis_${nodeId}.index + '号库');
                debugLogging.pushDebug('操作的key：' + key);
                <#if opeType=="set">
                    value = ${value};
                    if (value == '' || value == undefined || value == null) {
                        reject(new Error('value is null'));
                    }
                    if (typeof (value) != 'string') {
                        value = JSON.stringify(value);
                    }
                    input.value = value;
                    debugLogging.pushDebug('操作的value：' + value);
                    let redisResult = await redisClient.redisSet(key,value,null,DATA_SOURCE_CONFIG_JSON.Redis_${nodeId});
                <#elseif opeType=="del">
                    let redisResult = await redisClient.redisDel(key,DATA_SOURCE_CONFIG_JSON.Redis_${nodeId});
                    debugLogging.pushDebug('删除成功');
                <#else >
                    let redisResult = await redisClient.redisGet(key,DATA_SOURCE_CONFIG_JSON.Redis_${nodeId});
                    debugLogging.pushDebug('查询成功：' + redisResult);
                </#if>
                resolve(redisResult);
            } catch (err) {
                debugLogging.pushDebug('操作失败：' + err.message);
                reject(err);
            }
        });
        node['${nodeId}'<#if loop>+ '_' + index</#if>] = result;
        debugLogging.assignOutput(node['${nodeId}'<#if loop>+ '_' + index</#if>]);
        return node['${nodeId}'<#if loop>+ '_' + index</#if>];
    } catch (e) {
        <#include "common/Catch.ftl">
    } finally {
        logEndTime = DebugLogging.getTimestamp();
        debugLogging.assignCommNoOutputParam(${nodeId}, ${nodeType}, '${nodeName}', input, logStartTime, logEndTime);
        node.debugLog.push(debugLogging);
    }
}